import React, { Component } from 'react';

import $api from './src/api/index'
import { AppRegistry,Image,Text,TextInput,Button, View,StyleSheet } from 'react-native';


/**
 * 登录
 */
const onButtonPress = () => {
  var url ="TripleDES/decode3Des";
  $api.post(url,"1111111111").then((data)=>{
    console.log(data)
  })
};
export default class FlexDirectionBasics extends Component {
  render() {
    return (
      <View style={{
        flex: 1, 
        flexDirection: 'column'
        }}>
        <View style={[{flex: 3, flexDirection: 'column'},styles.center]} >

          <Image source={require("./img/logo.png")} style={styles.logo}/>
          <Text style={styles.logo_Font}>语音专线集中管控平台</Text>
        </View>
        <View style={[{flex: 3, paddingLeft:10, paddingRight:10,}]} >
          <TextInput style={styles.logo_input}  placeholder="用户名/手机号" />
          <TextInput style={[{width:80},styles.logo_input]}  placeholder="短信验证码" />
           {/* <View style={{flexDirection: 'row'}}>
            <TextInput style={[{width:80},styles.logo_input]}  placeholder="短信验证码" />
            <Button  title="获取验证码" color="#4AA4EE" />
          </View> */}
          <TextInput style={styles.logo_input} placeholder="请输入密码" />
          <Button onPress={onButtonPress} style={{height:80}} title="登录" color="#4AA4EE" />
        </View>
        <View style={{flex: 1, padding: 10, alignItems:'center', justifyContent:'flex-end'}} >
          <Text style={styles.foot_font}>Copyright©1999-2015 中国移动 版权所有</Text>
        </View>
      </View>
    );
  }
};


var styles = StyleSheet.create({
  flex:{
    flex: 1
  },
  center:{
    alignItems:'center',
    justifyContent: 'center',
  },
  logo: {
    width: 120,
    height: 120,
    marginBottom:20,
  },
  logo_input:{
    height: 50,
    fontSize: 18,
  
    marginBottom:30,
    borderBottomWidth: 0.81,
    borderBottomColor:'#ccc',
  },
  logo_Font: {
    fontSize: 22
  },
  foot_font:{
    fontSize: 12,
  }
});